import {Component, Input} from '@angular/core';

@Component({
  selector: 'app-title',
  templateUrl: 'title.component.html',
  styleUrls: ['title.component.scss']
})
export class TitleComponent {
  @Input()
  titleCpt:TitleCpt;
}

export class TitleCpt {
  shadowTitle:string;
  fontColor:string = '#000';
  subTitle:string;
  title:string;
  bgColor:string = '#90c31f';

  constructor(shadowTitle?:string, title?:string, subTitle?:string) {
    this.shadowTitle = shadowTitle;
    this.title = title;
    this.subTitle = subTitle;
  }

  setFontColor(fontColor:string):TitleCpt {
    this.fontColor = fontColor;
    return this;
  }

  setBgColor(bgColor:string):TitleCpt {
    this.bgColor = bgColor;
    return this;
  }
}

